<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<jsp:include page="partial/process_cache.jsp" />
<jsp:useBean id="usercache" scope="session"
	class="session.cache.UserCache" />
<%@page import="archsw0904.controller.catalog.*"%>
<%@page import="session.*"%>
<%
	request.setCharacterEncoding(application
			.getInitParameter("PARAMETER_ENCODING"));

	CatalogServiceLocator service = new CatalogServiceLocator();

	service.setCatalogPortEndpointAddress(application
			.getInitParameter("CATALOG_WEB_SERVICE_URI"));
	Catalog bookService = service.getCatalogPort();
	Book libri[];
	libri = bookService.queryPromotions();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Home @ <%=usercache.getHostingNode()%></title>
</head>
<body>
<jsp:include page="/partial/head_menu.jsp" />
<div style="float: left;">
<%
	if (libri == null) {
%>
<h1>Out of buisness...</h1>
<%
	} else {
%> <jsp:useBean id="booksCache" scope="request"
	class="session.cache.BookQueryCache" /> <%
 	booksCache.setBooks(libri);
 %> <jsp:include page="/partial/books_table.jsp" />
<p>&nbsp;</p>
<%
	}
%>
</div>
<%
	if (usercache.isClient()) {
%>
<div style="float: right;"><jsp:include
	page="/partial/cart_summary.jsp" /></div>
<%
	}
%>
</body>
</html>